feat: add custom calendar reminder for Google Calendar events#26078
feat: add custom calendar reminder for Google Calendar events#26078eunjae-lee merged 27 commits intocalcom:mainfrom
Conversation
|
@Deepak22448 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
3 issues found across 11 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/trpc/server/routers/viewer/calendars/setDestinationReminder.schema.ts">
<violation number="1" location="packages/trpc/server/routers/viewer/calendars/setDestinationReminder.schema.ts:6">
P2: Schema validation is overly permissive - allows any value 0-60 but the feature only supports 10, 30, or 60 minutes. Consider using `z.enum()` or `z.union()` with literal values to restrict to valid options, which also provides better type safety and self-documents the allowed values.</violation>
</file>
<file name="packages/platform/atoms/destination-calendar/wrappers/DestinationCalendarSettingsWebWrapper.tsx">
<violation number="1" location="packages/platform/atoms/destination-calendar/wrappers/DestinationCalendarSettingsWebWrapper.tsx:18">
P2: Use `t()` for localization instead of hardcoded strings. Import `useLocale` and use translation keys:
```typescript
const { t } = useLocale();
...
showToast(t("reminder_updated"), "success");
```</violation>
</file>
<file name="packages/app-store/googlecalendar/lib/__tests__/CalendarService.test.ts">
<violation number="1" location="packages/app-store/googlecalendar/lib/__tests__/CalendarService.test.ts:461">
P1: Test data contradicts test purpose. The test claims to verify behavior 'when no custom reminder is configured' but sets `customCalendarReminder: 10`. To test the default reminders scenario, this should be `null` or omitted.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
packages/trpc/server/routers/viewer/calendars/setDestinationReminder.schema.ts
Outdated
Show resolved
Hide resolved
packages/platform/atoms/destination-calendar/wrappers/DestinationCalendarSettingsWebWrapper.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/app-store/googlecalendar/lib/__tests__/CalendarService.test.ts">
<violation number="1" location="packages/app-store/googlecalendar/lib/__tests__/CalendarService.test.ts:720">
P1: Test data contradicts test purpose. This test is meant to verify default reminders are used when **no** custom reminder is configured (`customCalendarReminder: null`). Changing it to `10` means a custom reminder IS configured, which invalidates the test's stated purpose. Either revert to `null` to test the default-reminder scenario, or update the test name and assertion to test the custom-reminder scenario.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
packages/app-store/googlecalendar/lib/__tests__/CalendarService.test.ts
Outdated
Show resolved
Hide resolved
|
@dhairyashiil can you please review my PR ? |
packages/prisma/migrations/20251220034814_add_custom_calendar_reminder/migration.sql
Outdated
Show resolved
Hide resolved
eunjae-lee
left a comment
There was a problem hiding this comment.
Thanks for your contribution ! It works well.
|
need more approval from other team. i'll ping them. |
|
Thanks @eunjae-lee. |
Changed from static to instance methods with getInstance() pattern as requested in review.
…pak22448/cal.com into feat/google-calendar-custom-reminder
|
Hi @eunjae-lee and @keithwillcode , I’ve addressed all the review comments and updated the changes accordingly. Could you please take another look and review when you get a chance? Thanks! |
Hi @Deepak22448 sorry for not providing enough feedback. here's a PR that contains more guide on how to properly create repositories / services using dependency injection. Could you follow that guide? |
- Remove getInstance() singleton pattern - Add DI tokens, module, and container - Update GoogleCalendarService and tRPC handler to use DI
@eunjae-lee Thanks for the guidance! I've now refactored the code to follow the dependency injection pattern |
eunjae-lee
left a comment
There was a problem hiding this comment.
fantastic. thanks for your contribution !
What does this PR do?
Allows users to set default reminder notifications (10, 30, or 60 minutes) for events created via Cal.com bookings in Google Calendar. This addresses the issue where Google Calendar's default reminders don't apply to API-created events.
Changes:
customCalendarReminderfield toDestinationCalendarmodelGoogleCalendarServiceto apply custom reminders (popup + email)Visual Demo (For contributors especially)
Video Demo:
https://www.loom.com/share/212f7fb3beac49bdace349452730eec2
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Expected behavior:
Checklist